home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / flight-of-the-museum.swf / scripts / engine / levelData / Level_09.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  3.2 KB  |  100 lines

  1. package engine.levelData
  2. {
  3.    import copy.CopyBank;
  4.    import engine.WorldScene;
  5.    import engine.dynamicObjects.*;
  6.    
  7.    public class Level_09 extends LevelData
  8.    {
  9.        
  10.       
  11.       public function Level_09()
  12.       {
  13.          super();
  14.          _goalParameters = new Array();
  15.       }
  16.       
  17.       override public function buildLevel() : *
  18.       {
  19.          var i:* = undefined;
  20.          var ring:* = undefined;
  21.          var fuelIcon:* = undefined;
  22.          var goalObj:Object = null;
  23.          var missionObj:Object = null;
  24.          var indian:* = undefined;
  25.          super.buildLevel();
  26.          for(i = 0; i < 20; i++)
  27.          {
  28.             indian = new Indian();
  29.             indian.x = 400 + i * 200;
  30.             indian.y = 710;
  31.             indian.LobMode = true;
  32.             WorldScene.Instance.GameplayObjects.push(indian);
  33.             WorldScene.Instance.Indians.push(indian);
  34.          }
  35.          for(i = 0; i < 5; i++)
  36.          {
  37.             ring = new GoalRing();
  38.             ring.x = 400 + i * 100;
  39.             ring.y = 550 + Math.sin(i * (Math.PI / 5)) * 200;
  40.             ring.rOffset = i * -(Math.PI / 5) + Math.PI / 2;
  41.             ring.SinAmp = 0.01;
  42.             WorldScene.Instance.GameplayObjects.push(ring);
  43.          }
  44.          for(i = 0; i < 5; i++)
  45.          {
  46.             ring = new GoalRing();
  47.             ring.x = 400 + i * 100;
  48.             ring.y = 500 + Math.sin(i * (Math.PI / 5)) * -200;
  49.             ring.rOffset = i * (Math.PI / 5) + Math.PI / 2;
  50.             ring.SinAmp = 0.01;
  51.             WorldScene.Instance.GameplayObjects.push(ring);
  52.          }
  53.          for(i = 0; i < 5; i++)
  54.          {
  55.             ring = new GoalRing();
  56.             ring.x = 2400 + i * 100;
  57.             ring.y = 550 + Math.sin(i * (Math.PI / 5)) * 200;
  58.             ring.rOffset = i * -(Math.PI / 5) + Math.PI / 2;
  59.             ring.SinAmp = 0.01;
  60.             WorldScene.Instance.GameplayObjects.push(ring);
  61.          }
  62.          for(i = 0; i < 5; i++)
  63.          {
  64.             ring = new GoalRing();
  65.             ring.x = 2400 + i * 100;
  66.             ring.y = 500 + Math.sin(i * (Math.PI / 5)) * -200;
  67.             ring.rOffset = i * (Math.PI / 5) + Math.PI / 2;
  68.             ring.SinAmp = 0.01;
  69.             WorldScene.Instance.GameplayObjects.push(ring);
  70.          }
  71.          fuelIcon = new FuelIcon();
  72.          fuelIcon.x = 1000;
  73.          fuelIcon.y = 200;
  74.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  75.          fuelIcon = new FuelIcon();
  76.          fuelIcon.x = 1000;
  77.          fuelIcon.y = 600;
  78.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  79.          _missionDescription = CopyBank.Instance.MissionDesc_Rings;
  80.          goalObj = {
  81.             "Type":"Ring",
  82.             "Count":20
  83.          };
  84.          _goalParameters.push(goalObj);
  85.          missionObj = {
  86.             "Description":_missionDescription,
  87.             "BoundsX":_missionBoundsX,
  88.             "BoundsHint":_missionBoundsHint,
  89.             "GoalParamaters":_goalParameters,
  90.             "PrimaryGoalType":"Rings",
  91.             "StartLoc":{
  92.                "x":50,
  93.                "y":850
  94.             }
  95.          };
  96.          WorldScene.Instance.setMissionDetails(missionObj);
  97.       }
  98.    }
  99. }
  100.